<template>
	<view class="contract">
		<image :src="contract" mode="widthFix"></image>
		<view class="button" v-if="status==1"><button type="primary" @click="goContract">签署合同</button></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				status: '',
				contract: ''
			};
		},
		onShow() {
			this.init()
		},
		methods: {
			init(){
				this.$api.MyContract().then(res => {
					this.contract = res.datas.contract
					this.status = res.datas.status
				})
			},
			goContract(){
				uni.showToast({
					icon: 'none',
					title: '请在《家具大师》APP中签署合同'
				})
				return false
				uni.navigateTo({
					url: '/pages/my/contract-form'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.contract{
		padding-bottom: 90rpx;
		image{
			width: 100%;
			margin: 20rpx 0;
		}
		.button{
			position: fixed;
			bottom: 0;
			left: 0;
			right: 0;
			button{
				height: 90rpx;
				line-height: 90rpx;
				font-size: 32rpx;
				border-radius: 0;
				background-color: #2073F5;
			}
		}
	}
</style>